Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

Q is empty.


QTRS
  ↳ Overlay + Local Confluence

Q restricted rewrite system:
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

Q is empty.

The TRS is overlay and locally confluent. By [19] we can switch to innermost.

↳ QTRS
  ↳ Overlay + Local Confluence
QTRS
      ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)


Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

RM(n, add(m, x)) → IF_RM(eq(n, m), n, add(m, x))
MINS(x, y, z) → IF(null(x), x, y, z)
MIN(add(n, add(m, x))) → IF_MIN(le(n, m), add(n, add(m, x)))
IF_RM(false, n, add(m, x)) → RM(n, x)
IF2(true, x, y, z) → APP(rm(head(x), tail(x)), y)
LE(s(x), s(y)) → LE(x, y)
IF2(false, x, y, z) → HEAD(x)
IF2(true, x, y, z) → RM(head(x), tail(x))
IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
RM(n, add(m, x)) → EQ(n, m)
IF2(true, x, y, z) → MINS(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
MIN(add(n, add(m, x))) → LE(n, m)
IF(false, x, y, z) → EQ(head(x), min(x))
IF(false, x, y, z) → MIN(x)
IF2(true, x, y, z) → APP(z, add(head(x), nil))
IF2(false, x, y, z) → MINS(tail(x), add(head(x), y), z)
APP(add(n, x), y) → APP(x, y)
MINSORT(x) → MINS(x, nil, nil)
IF2(true, x, y, z) → HEAD(x)
IF2(false, x, y, z) → TAIL(x)
IF_MIN(false, add(n, add(m, x))) → MIN(add(m, x))
EQ(s(x), s(y)) → EQ(x, y)
MINS(x, y, z) → NULL(x)
IF_RM(true, n, add(m, x)) → RM(n, x)
IF(false, x, y, z) → HEAD(x)
IF_MIN(true, add(n, add(m, x))) → MIN(add(n, x))
IF2(true, x, y, z) → TAIL(x)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

RM(n, add(m, x)) → IF_RM(eq(n, m), n, add(m, x))
MINS(x, y, z) → IF(null(x), x, y, z)
MIN(add(n, add(m, x))) → IF_MIN(le(n, m), add(n, add(m, x)))
IF_RM(false, n, add(m, x)) → RM(n, x)
IF2(true, x, y, z) → APP(rm(head(x), tail(x)), y)
LE(s(x), s(y)) → LE(x, y)
IF2(false, x, y, z) → HEAD(x)
IF2(true, x, y, z) → RM(head(x), tail(x))
IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
RM(n, add(m, x)) → EQ(n, m)
IF2(true, x, y, z) → MINS(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
MIN(add(n, add(m, x))) → LE(n, m)
IF(false, x, y, z) → EQ(head(x), min(x))
IF(false, x, y, z) → MIN(x)
IF2(true, x, y, z) → APP(z, add(head(x), nil))
IF2(false, x, y, z) → MINS(tail(x), add(head(x), y), z)
APP(add(n, x), y) → APP(x, y)
MINSORT(x) → MINS(x, nil, nil)
IF2(true, x, y, z) → HEAD(x)
IF2(false, x, y, z) → TAIL(x)
IF_MIN(false, add(n, add(m, x))) → MIN(add(m, x))
EQ(s(x), s(y)) → EQ(x, y)
MINS(x, y, z) → NULL(x)
IF_RM(true, n, add(m, x)) → RM(n, x)
IF(false, x, y, z) → HEAD(x)
IF_MIN(true, add(n, add(m, x))) → MIN(add(n, x))
IF2(true, x, y, z) → TAIL(x)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 6 SCCs with 14 less nodes.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP(add(n, x), y) → APP(x, y)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP(add(n, x), y) → APP(x, y)

R is empty.
The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

APP(add(n, x), y) → APP(x, y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

LE(s(x), s(y)) → LE(x, y)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

LE(s(x), s(y)) → LE(x, y)

R is empty.
The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

LE(s(x), s(y)) → LE(x, y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

IF_MIN(false, add(n, add(m, x))) → MIN(add(m, x))
MIN(add(n, add(m, x))) → IF_MIN(le(n, m), add(n, add(m, x)))
IF_MIN(true, add(n, add(m, x))) → MIN(add(n, x))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

IF_MIN(false, add(n, add(m, x))) → MIN(add(m, x))
MIN(add(n, add(m, x))) → IF_MIN(le(n, m), add(n, add(m, x)))
IF_MIN(true, add(n, add(m, x))) → MIN(add(n, x))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ QDPOrderProof
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MIN(add(n, add(m, x))) → IF_MIN(le(n, m), add(n, add(m, x)))
IF_MIN(false, add(n, add(m, x))) → MIN(add(m, x))
IF_MIN(true, add(n, add(m, x))) → MIN(add(n, x))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MIN(add(n, add(m, x))) → IF_MIN(le(n, m), add(n, add(m, x)))
The remaining pairs can at least be oriented weakly.

IF_MIN(false, add(n, add(m, x))) → MIN(add(m, x))
IF_MIN(true, add(n, add(m, x))) → MIN(add(n, x))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(IF_MIN(x1, x2)) = x2   
POL(MIN(x1)) = 1 + x1   
POL(add(x1, x2)) = 1 + x2   
POL(false) = 0   
POL(le(x1, x2)) = 0   
POL(s(x1)) = 0   
POL(true) = 0   

The following usable rules [17] were oriented: none



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ QDPOrderProof
QDP
                            ↳ DependencyGraphProof
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

IF_MIN(false, add(n, add(m, x))) → MIN(add(m, x))
IF_MIN(true, add(n, add(m, x))) → MIN(add(n, x))

The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 2 less nodes.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

EQ(s(x), s(y)) → EQ(x, y)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

EQ(s(x), s(y)) → EQ(x, y)

R is empty.
The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

EQ(s(x), s(y)) → EQ(x, y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

RM(n, add(m, x)) → IF_RM(eq(n, m), n, add(m, x))
IF_RM(true, n, add(m, x)) → RM(n, x)
IF_RM(false, n, add(m, x)) → RM(n, x)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

RM(n, add(m, x)) → IF_RM(eq(n, m), n, add(m, x))
IF_RM(true, n, add(m, x)) → RM(n, x)
IF_RM(false, n, add(m, x)) → RM(n, x)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

RM(n, add(m, x)) → IF_RM(eq(n, m), n, add(m, x))
IF_RM(true, n, add(m, x)) → RM(n, x)
IF_RM(false, n, add(m, x)) → RM(n, x)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))

We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
MINS(x, y, z) → IF(null(x), x, y, z)
IF2(false, x, y, z) → MINS(tail(x), add(head(x), y), z)
IF2(true, x, y, z) → MINS(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(true, add(n, add(m, x))) → min(add(n, x))
if_min(false, add(n, add(m, x))) → min(add(m, x))
head(add(n, x)) → n
tail(add(n, x)) → x
tail(nil) → nil
null(nil) → true
null(add(n, x)) → false
rm(n, nil) → nil
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(true, n, add(m, x)) → rm(n, x)
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
minsort(x) → mins(x, nil, nil)
mins(x, y, z) → if(null(x), x, y, z)
if(true, x, y, z) → z
if(false, x, y, z) → if2(eq(head(x), min(x)), x, y, z)
if2(true, x, y, z) → mins(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))
if2(false, x, y, z) → mins(tail(x), add(head(x), y), z)

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
MINS(x, y, z) → IF(null(x), x, y, z)
IF2(false, x, y, z) → MINS(tail(x), add(head(x), y), z)
IF2(true, x, y, z) → MINS(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))

The TRS R consists of the following rules:

head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
null(nil) → true
null(add(n, x)) → false
tail(add(n, x)) → x
tail(nil) → nil
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))
minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

minsort(x0)
mins(x0, x1, x2)
if(true, x0, x1, x2)
if(false, x0, x1, x2)
if2(true, x0, x1, x2)
if2(false, x0, x1, x2)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
QDP
                        ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
MINS(x, y, z) → IF(null(x), x, y, z)
IF2(false, x, y, z) → MINS(tail(x), add(head(x), y), z)
IF2(true, x, y, z) → MINS(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))

The TRS R consists of the following rules:

head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
null(nil) → true
null(add(n, x)) → false
tail(add(n, x)) → x
tail(nil) → nil
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MINS(x, y, z) → IF(null(x), x, y, z) at position [0] we obtained the following new rules:

MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)
MINS(nil, y1, y2) → IF(true, nil, y1, y2)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
MINS(nil, y1, y2) → IF(true, nil, y1, y2)
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)
IF2(false, x, y, z) → MINS(tail(x), add(head(x), y), z)
IF2(true, x, y, z) → MINS(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))

The TRS R consists of the following rules:

head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
null(nil) → true
null(add(n, x)) → false
tail(add(n, x)) → x
tail(nil) → nil
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
QDP
                                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
IF2(false, x, y, z) → MINS(tail(x), add(head(x), y), z)
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)
IF2(true, x, y, z) → MINS(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))

The TRS R consists of the following rules:

head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
null(nil) → true
null(add(n, x)) → false
tail(add(n, x)) → x
tail(nil) → nil
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
QDP
                                    ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
IF2(false, x, y, z) → MINS(tail(x), add(head(x), y), z)
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)
IF2(true, x, y, z) → MINS(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))

The TRS R consists of the following rules:

head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
tail(add(n, x)) → x
tail(nil) → nil
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
null(nil)
null(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

null(nil)
null(add(x0, x1))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
QDP
                                        ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)
IF2(false, x, y, z) → MINS(tail(x), add(head(x), y), z)
IF2(true, x, y, z) → MINS(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))

The TRS R consists of the following rules:

head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
tail(add(n, x)) → x
tail(nil) → nil
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule IF2(false, x, y, z) → MINS(tail(x), add(head(x), y), z) at position [0] we obtained the following new rules:

IF2(false, nil, y1, y2) → MINS(nil, add(head(nil), y1), y2)
IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(head(add(x0, x1)), y1), y2)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
QDP
                                            ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

IF2(false, nil, y1, y2) → MINS(nil, add(head(nil), y1), y2)
IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(head(add(x0, x1)), y1), y2)
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)
IF2(true, x, y, z) → MINS(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))

The TRS R consists of the following rules:

head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
tail(add(n, x)) → x
tail(nil) → nil
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
QDP
                                                ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(head(add(x0, x1)), y1), y2)
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)
IF2(true, x, y, z) → MINS(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))

The TRS R consists of the following rules:

head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
tail(add(n, x)) → x
tail(nil) → nil
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(head(add(x0, x1)), y1), y2) at position [1,0] we obtained the following new rules:

IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(x0, y1), y2)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Rewriting
QDP
                                                    ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(x0, y1), y2)
IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)
IF2(true, x, y, z) → MINS(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil)))

The TRS R consists of the following rules:

head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
tail(add(n, x)) → x
tail(nil) → nil
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule IF2(true, x, y, z) → MINS(app(rm(head(x), tail(x)), y), nil, app(z, add(head(x), nil))) at position [0] we obtained the following new rules:

IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(head(add(x0, x1)), x1), y1), nil, app(y2, add(head(add(x0, x1)), nil)))
IF2(true, nil, y1, y2) → MINS(app(rm(head(nil), nil), y1), nil, app(y2, add(head(nil), nil)))
IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, tail(add(x0, x1))), y1), nil, app(y2, add(head(add(x0, x1)), nil)))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Narrowing
QDP
                                                        ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(x0, y1), y2)
IF2(true, nil, y1, y2) → MINS(app(rm(head(nil), nil), y1), nil, app(y2, add(head(nil), nil)))
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)
IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(head(add(x0, x1)), x1), y1), nil, app(y2, add(head(add(x0, x1)), nil)))
IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, tail(add(x0, x1))), y1), nil, app(y2, add(head(add(x0, x1)), nil)))

The TRS R consists of the following rules:

head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
tail(add(n, x)) → x
tail(nil) → nil
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ UsableRulesProof
QDP
                                                            ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(x0, y1), y2)
IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
IF2(true, nil, y1, y2) → MINS(app(rm(head(nil), nil), y1), nil, app(y2, add(head(nil), nil)))
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)
IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(head(add(x0, x1)), x1), y1), nil, app(y2, add(head(add(x0, x1)), nil)))
IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, tail(add(x0, x1))), y1), nil, app(y2, add(head(add(x0, x1)), nil)))

The TRS R consists of the following rules:

rm(n, nil) → nil
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
tail(add(n, x)) → x

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(head(add(x0, x1)), x1), y1), nil, app(y2, add(head(add(x0, x1)), nil))) at position [0,0,0] we obtained the following new rules:

IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, x1), y1), nil, app(y2, add(head(add(x0, x1)), nil)))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ UsableRulesProof
                                                          ↳ QDP
                                                            ↳ Rewriting
QDP
                                                                ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(x0, y1), y2)
IF2(true, nil, y1, y2) → MINS(app(rm(head(nil), nil), y1), nil, app(y2, add(head(nil), nil)))
IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, x1), y1), nil, app(y2, add(head(add(x0, x1)), nil)))
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)
IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, tail(add(x0, x1))), y1), nil, app(y2, add(head(add(x0, x1)), nil)))

The TRS R consists of the following rules:

rm(n, nil) → nil
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
tail(add(n, x)) → x

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule IF2(true, nil, y1, y2) → MINS(app(rm(head(nil), nil), y1), nil, app(y2, add(head(nil), nil))) at position [0,0] we obtained the following new rules:

IF2(true, nil, y1, y2) → MINS(app(nil, y1), nil, app(y2, add(head(nil), nil)))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ UsableRulesProof
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
QDP
                                                                    ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(x0, y1), y2)
IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
IF2(true, nil, y1, y2) → MINS(app(nil, y1), nil, app(y2, add(head(nil), nil)))
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)
IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, x1), y1), nil, app(y2, add(head(add(x0, x1)), nil)))
IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, tail(add(x0, x1))), y1), nil, app(y2, add(head(add(x0, x1)), nil)))

The TRS R consists of the following rules:

rm(n, nil) → nil
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
tail(add(n, x)) → x

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, tail(add(x0, x1))), y1), nil, app(y2, add(head(add(x0, x1)), nil))) at position [0,0,1] we obtained the following new rules:

IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, x1), y1), nil, app(y2, add(head(add(x0, x1)), nil)))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ UsableRulesProof
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
QDP
                                                                        ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(x0, y1), y2)
IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, x1), y1), nil, app(y2, add(head(add(x0, x1)), nil)))
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)
IF2(true, nil, y1, y2) → MINS(app(nil, y1), nil, app(y2, add(head(nil), nil)))

The TRS R consists of the following rules:

rm(n, nil) → nil
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))
tail(add(n, x)) → x

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ UsableRulesProof
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ UsableRulesProof
QDP
                                                                            ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(x0, y1), y2)
IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
IF2(true, nil, y1, y2) → MINS(app(nil, y1), nil, app(y2, add(head(nil), nil)))
IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, x1), y1), nil, app(y2, add(head(add(x0, x1)), nil)))
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)

The TRS R consists of the following rules:

app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
tail(add(x0, x1))
tail(nil)
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

tail(add(x0, x1))
tail(nil)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ UsableRulesProof
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ UsableRulesProof
                                                                          ↳ QDP
                                                                            ↳ QReductionProof
QDP
                                                                                ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(x0, y1), y2)
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)
IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, x1), y1), nil, app(y2, add(head(add(x0, x1)), nil)))
IF2(true, nil, y1, y2) → MINS(app(nil, y1), nil, app(y2, add(head(nil), nil)))

The TRS R consists of the following rules:

app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule IF2(true, nil, y1, y2) → MINS(app(nil, y1), nil, app(y2, add(head(nil), nil))) at position [0] we obtained the following new rules:

IF2(true, nil, y1, y2) → MINS(y1, nil, app(y2, add(head(nil), nil)))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ UsableRulesProof
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ UsableRulesProof
                                                                          ↳ QDP
                                                                            ↳ QReductionProof
                                                                              ↳ QDP
                                                                                ↳ Rewriting
QDP
                                                                                    ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(x0, y1), y2)
IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, x1), y1), nil, app(y2, add(head(add(x0, x1)), nil)))
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)
IF2(true, nil, y1, y2) → MINS(y1, nil, app(y2, add(head(nil), nil)))

The TRS R consists of the following rules:

app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, x1), y1), nil, app(y2, add(head(add(x0, x1)), nil))) at position [2,1,0] we obtained the following new rules:

IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, x1), y1), nil, app(y2, add(x0, nil)))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ UsableRulesProof
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ UsableRulesProof
                                                                          ↳ QDP
                                                                            ↳ QReductionProof
                                                                              ↳ QDP
                                                                                ↳ Rewriting
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
QDP
                                                                                        ↳ Instantiation

Q DP problem:
The TRS P consists of the following rules:

IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, x1), y1), nil, app(y2, add(x0, nil)))
IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z)
IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(x0, y1), y2)
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)
IF2(true, nil, y1, y2) → MINS(y1, nil, app(y2, add(head(nil), nil)))

The TRS R consists of the following rules:

app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
By instantiating [15] the rule IF(false, x, y, z) → IF2(eq(head(x), min(x)), x, y, z) we obtained the following new rules:

IF(false, add(z0, z1), z2, z3) → IF2(eq(head(add(z0, z1)), min(add(z0, z1))), add(z0, z1), z2, z3)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ UsableRulesProof
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ UsableRulesProof
                                                                          ↳ QDP
                                                                            ↳ QReductionProof
                                                                              ↳ QDP
                                                                                ↳ Rewriting
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ Instantiation
QDP
                                                                                            ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, x1), y1), nil, app(y2, add(x0, nil)))
IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(x0, y1), y2)
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)
IF(false, add(z0, z1), z2, z3) → IF2(eq(head(add(z0, z1)), min(add(z0, z1))), add(z0, z1), z2, z3)
IF2(true, nil, y1, y2) → MINS(y1, nil, app(y2, add(head(nil), nil)))

The TRS R consists of the following rules:

app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ UsableRulesProof
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ UsableRulesProof
                                                                          ↳ QDP
                                                                            ↳ QReductionProof
                                                                              ↳ QDP
                                                                                ↳ Rewriting
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ Instantiation
                                                                                          ↳ QDP
                                                                                            ↳ DependencyGraphProof
QDP
                                                                                                ↳ Rewriting

Q DP problem:
The TRS P consists of the following rules:

IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, x1), y1), nil, app(y2, add(x0, nil)))
IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(x0, y1), y2)
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)
IF(false, add(z0, z1), z2, z3) → IF2(eq(head(add(z0, z1)), min(add(z0, z1))), add(z0, z1), z2, z3)

The TRS R consists of the following rules:

app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
By rewriting [15] the rule IF(false, add(z0, z1), z2, z3) → IF2(eq(head(add(z0, z1)), min(add(z0, z1))), add(z0, z1), z2, z3) at position [0,0] we obtained the following new rules:

IF(false, add(z0, z1), z2, z3) → IF2(eq(z0, min(add(z0, z1))), add(z0, z1), z2, z3)



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ UsableRulesProof
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ UsableRulesProof
                                                                          ↳ QDP
                                                                            ↳ QReductionProof
                                                                              ↳ QDP
                                                                                ↳ Rewriting
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ Instantiation
                                                                                          ↳ QDP
                                                                                            ↳ DependencyGraphProof
                                                                                              ↳ QDP
                                                                                                ↳ Rewriting
QDP
                                                                                                    ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, x1), y1), nil, app(y2, add(x0, nil)))
IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(x0, y1), y2)
IF(false, add(z0, z1), z2, z3) → IF2(eq(z0, min(add(z0, z1))), add(z0, z1), z2, z3)
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)

The TRS R consists of the following rules:

app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
head(add(n, x)) → n
min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ UsableRulesProof
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ UsableRulesProof
                                                                          ↳ QDP
                                                                            ↳ QReductionProof
                                                                              ↳ QDP
                                                                                ↳ Rewriting
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ Instantiation
                                                                                          ↳ QDP
                                                                                            ↳ DependencyGraphProof
                                                                                              ↳ QDP
                                                                                                ↳ Rewriting
                                                                                                  ↳ QDP
                                                                                                    ↳ UsableRulesProof
QDP
                                                                                                        ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, x1), y1), nil, app(y2, add(x0, nil)))
IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(x0, y1), y2)
IF(false, add(z0, z1), z2, z3) → IF2(eq(z0, min(add(z0, z1))), add(z0, z1), z2, z3)
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)

The TRS R consists of the following rules:

min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
head(add(x0, x1))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

head(add(x0, x1))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ UsableRulesProof
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ UsableRulesProof
                                                                          ↳ QDP
                                                                            ↳ QReductionProof
                                                                              ↳ QDP
                                                                                ↳ Rewriting
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ Instantiation
                                                                                          ↳ QDP
                                                                                            ↳ DependencyGraphProof
                                                                                              ↳ QDP
                                                                                                ↳ Rewriting
                                                                                                  ↳ QDP
                                                                                                    ↳ UsableRulesProof
                                                                                                      ↳ QDP
                                                                                                        ↳ QReductionProof
QDP
                                                                                                            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, x1), y1), nil, app(y2, add(x0, nil)))
IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(x0, y1), y2)
IF(false, add(z0, z1), z2, z3) → IF2(eq(z0, min(add(z0, z1))), add(z0, z1), z2, z3)
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)

The TRS R consists of the following rules:

min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


IF2(true, add(x0, x1), y1, y2) → MINS(app(rm(x0, x1), y1), nil, app(y2, add(x0, nil)))
The remaining pairs can at least be oriented weakly.

IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(x0, y1), y2)
IF(false, add(z0, z1), z2, z3) → IF2(eq(z0, min(add(z0, z1))), add(z0, z1), z2, z3)
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(IF(x1, x2, x3, x4)) = x2 + x3   
POL(IF2(x1, x2, x3, x4)) = x2 + x3   
POL(MINS(x1, x2, x3)) = x1 + x2   
POL(add(x1, x2)) = 1 + x2   
POL(app(x1, x2)) = x1 + x2   
POL(eq(x1, x2)) = 0   
POL(false) = 0   
POL(if_min(x1, x2)) = 0   
POL(if_rm(x1, x2, x3)) = x3   
POL(le(x1, x2)) = 0   
POL(min(x1)) = 0   
POL(nil) = 0   
POL(rm(x1, x2)) = x2   
POL(s(x1)) = 0   
POL(true) = 0   

The following usable rules [17] were oriented:

if_rm(false, n, add(m, x)) → add(m, rm(n, x))
app(add(n, x), y) → add(n, app(x, y))
app(nil, y) → y
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
rm(n, nil) → nil



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ UsableRulesProof
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ UsableRulesProof
                                                                          ↳ QDP
                                                                            ↳ QReductionProof
                                                                              ↳ QDP
                                                                                ↳ Rewriting
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ Instantiation
                                                                                          ↳ QDP
                                                                                            ↳ DependencyGraphProof
                                                                                              ↳ QDP
                                                                                                ↳ Rewriting
                                                                                                  ↳ QDP
                                                                                                    ↳ UsableRulesProof
                                                                                                      ↳ QDP
                                                                                                        ↳ QReductionProof
                                                                                                          ↳ QDP
                                                                                                            ↳ QDPOrderProof
QDP
                                                                                                                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(x0, y1), y2)
IF(false, add(z0, z1), z2, z3) → IF2(eq(z0, min(add(z0, z1))), add(z0, z1), z2, z3)
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)

The TRS R consists of the following rules:

min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
rm(n, nil) → nil
if_rm(true, n, add(m, x)) → rm(n, x)
rm(n, add(m, x)) → if_rm(eq(n, m), n, add(m, x))
app(nil, y) → y
app(add(n, x), y) → add(n, app(x, y))
if_rm(false, n, add(m, x)) → add(m, rm(n, x))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ UsableRulesProof
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ UsableRulesProof
                                                                          ↳ QDP
                                                                            ↳ QReductionProof
                                                                              ↳ QDP
                                                                                ↳ Rewriting
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ Instantiation
                                                                                          ↳ QDP
                                                                                            ↳ DependencyGraphProof
                                                                                              ↳ QDP
                                                                                                ↳ Rewriting
                                                                                                  ↳ QDP
                                                                                                    ↳ UsableRulesProof
                                                                                                      ↳ QDP
                                                                                                        ↳ QReductionProof
                                                                                                          ↳ QDP
                                                                                                            ↳ QDPOrderProof
                                                                                                              ↳ QDP
                                                                                                                ↳ UsableRulesProof
QDP
                                                                                                                    ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(x0, y1), y2)
IF(false, add(z0, z1), z2, z3) → IF2(eq(z0, min(add(z0, z1))), add(z0, z1), z2, z3)
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)

The TRS R consists of the following rules:

min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
app(nil, x0)
app(add(x0, x1), x2)
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

app(nil, x0)
app(add(x0, x1), x2)
rm(x0, nil)
rm(x0, add(x1, x2))
if_rm(true, x0, add(x1, x2))
if_rm(false, x0, add(x1, x2))



↳ QTRS
  ↳ Overlay + Local Confluence
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ QReductionProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ DependencyGraphProof
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ DependencyGraphProof
                                              ↳ QDP
                                                ↳ Rewriting
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ UsableRulesProof
                                                          ↳ QDP
                                                            ↳ Rewriting
                                                              ↳ QDP
                                                                ↳ Rewriting
                                                                  ↳ QDP
                                                                    ↳ Rewriting
                                                                      ↳ QDP
                                                                        ↳ UsableRulesProof
                                                                          ↳ QDP
                                                                            ↳ QReductionProof
                                                                              ↳ QDP
                                                                                ↳ Rewriting
                                                                                  ↳ QDP
                                                                                    ↳ Rewriting
                                                                                      ↳ QDP
                                                                                        ↳ Instantiation
                                                                                          ↳ QDP
                                                                                            ↳ DependencyGraphProof
                                                                                              ↳ QDP
                                                                                                ↳ Rewriting
                                                                                                  ↳ QDP
                                                                                                    ↳ UsableRulesProof
                                                                                                      ↳ QDP
                                                                                                        ↳ QReductionProof
                                                                                                          ↳ QDP
                                                                                                            ↳ QDPOrderProof
                                                                                                              ↳ QDP
                                                                                                                ↳ UsableRulesProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ QReductionProof
QDP
                                                                                                                        ↳ QDPSizeChangeProof

Q DP problem:
The TRS P consists of the following rules:

IF2(false, add(x0, x1), y1, y2) → MINS(x1, add(x0, y1), y2)
IF(false, add(z0, z1), z2, z3) → IF2(eq(z0, min(add(z0, z1))), add(z0, z1), z2, z3)
MINS(add(x0, x1), y1, y2) → IF(false, add(x0, x1), y1, y2)

The TRS R consists of the following rules:

min(add(n, nil)) → n
min(add(n, add(m, x))) → if_min(le(n, m), add(n, add(m, x)))
if_min(false, add(n, add(m, x))) → min(add(m, x))
if_min(true, add(n, add(m, x))) → min(add(n, x))
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
min(add(x0, nil))
min(add(x0, add(x1, x2)))
if_min(true, add(x0, add(x1, x2)))
if_min(false, add(x0, add(x1, x2)))

We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs: